"""
Hongyu (Vicky) Ye 
03/13/2021
Section #03
Part#3: Prime Number Finder

"""
"""
number = int(input("Enter a positive number of test: "))
print()

divisible = 0
not_divisible = 0

for i in range (2, number):
    if(number % i) == 0:
        print(i, "is a divisor of", number, "... stopping")
        divisible += 1
        break
    else:
        print(i, "is NOT a divisor of", number, "... continuing")
        not_divisible += 1

if divisible > 0:
    print()
    print(number, "is not a prime number.")

elif not_divisible == (number - 2):
    print()
    print(number, "is a prime number.")
"""

while True:
    startNumber = int(input("Start number: "))
    if (startNumber > 0):
        break
    else:
        print("Start and end must be positive")

while True:
    endNumber = int(input("End number: "))
    if(endNumber > startNumber):
        break
    elif (endNumber > 0):
        print("End number must be greater than start number")
    else:
        print("Start and end must be positive")


for i in range (startNumber, endNumber + 1):
    flag = 1
    for number in range(2, (i//2+1)):
        if(i % number == 0):
            flag = 0
    if flag:
        print(i)






    
    

